package com.edevp.common.web.config;

import com.edevp.common.web.interceptor.LogbackInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.annotation.Order;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * 因为用了mdc,所以就不需要了
 * @author Blueeyedboy
 * @date 2022-07-06 5:00 PM
 **/

//@Order(100)
//@Configuration
public class LogbackWebMvcConfigurer implements WebMvcConfigurer {
	@Override
	public void addInterceptors(InterceptorRegistry registry) {
		registry.addInterceptor(new LogbackInterceptor()).addPathPatterns("/*/*/**");
		// 不需要执行如下
		//WebMvcConfigurer.super.addInterceptors(registry);
	}
}
